package hu.mapro.flang.gwt.domain.server;

import hu.mapro.model.LongId;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;

import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.entity.RooJpaEntity;

@RooJavaBean
@RooJpaEntity
public class User implements LongId {

	String username;
	
    String password;
    
    String email;
    
    // TODO remove eager
    @OneToMany(mappedBy="user", cascade=CascadeType.ALL, orphanRemoval=true, fetch=FetchType.EAGER)
    Set<UserPrivilege> privileges;

}
